package com.jinglvhuanjing.app.bean.param;

import com.alibaba.fastjson.JSONObject;

public class ParamLayout1Bean {
    /*** json - key - 分类站编号 ***/
    public static final String PARAM_KEY_FLZBH = "flzbh";
    /*** json - key - 网络通信状态 ***/
    public static final String PARAM_KEY_WLTXZT = "wltxzt";
    /*** json - key - 服务器IP ***/
    public static final String PARAM_KEY_FWQIP = "fwqip";
    /*** json - key - 数据传输间隔 ***/
    public static final String PARAM_KEY_SJCSJG = "sjcsjg";

    private String flzbh;
    private String wltxzt;
    private String fwqip;
    private String sjcsjg;



    public void setFlzbh(String flzbh) {
        this.flzbh = flzbh;
    }

    public void setWltxzt(String wltxzt) {
        this.wltxzt = wltxzt;
    }

    public void setFwqip(String fwqip) {
        this.fwqip = fwqip;
    }

    public void setSjcsjg(String sjcsjg) {
        this.sjcsjg = sjcsjg;
    }

    public String getFlzbh() {
        return flzbh;
    }

    public String getWltxzt() {
        return wltxzt;
    }

    public String getFwqip() {
        return fwqip;
    }

    public String getSjcsjg() {
        return sjcsjg;
    }

    public void parse(JSONObject data){
        setFlzbh(data.getString(PARAM_KEY_FLZBH));
        setWltxzt(data.getString(PARAM_KEY_WLTXZT));
        setFwqip(data.getString(PARAM_KEY_FWQIP));
        setSjcsjg(data.getString(PARAM_KEY_SJCSJG));
    }

    @Override
    public String toString() {
        JSONObject object = new JSONObject();
        object.put(PARAM_KEY_FLZBH , flzbh);
        object.put(PARAM_KEY_WLTXZT , wltxzt);
        object.put(PARAM_KEY_FWQIP , fwqip);
        object.put(PARAM_KEY_SJCSJG , sjcsjg);
        return object.toJSONString();
    }
}
